//@author: wangzy
//@date: 2018/3/31
//@description: 路由表配置

import HelloWorld from '@/components/HelloWorld'
import Main from '@/components/Main'
import Index from '@/components/Index'

export const loginRouter = {
	path: '/login',
	name: 'helloworld',
	component: HelloWorld
}

export const mainRouter = {
	path: '/main',
	name: 'main',
	component: Main,
	children: [
	//	主页
//		{ 
//			path: 'home', 
//			title: {i18n: 'home'}, 
//			name: 'home', 
//			component: resolve => { 
//				require(['@/components/home/home.vue'], resolve);
//			}
//		},
//		{
//			path: 'person',
//			title: {
//				i18n: 'person'
//			},
//			name: 'person',
//			component: resolve => {
//				require(['@/components/person/person.vue'], resolve);
//			}
//		},
//		{
//			path: 'square',
//			title: {
//				i18n: 'square'
//			},
//			name: 'square',
//			component: resolve => {
//				require(['@/components/square/square.vue'], resolve);
//			}
//		},
	]
}

export const appRouter = [
	{
		path: '/',
		title: '工塑之家',
		name: 'index',
		component: Index
	}
]

// 所有上面定义的路由都要写在下面的routers里
export const routers = [
	loginRouter,
	mainRouter,
	...appRouter,
];